<script setup>
import { monitorIndex } from '@/config/config.js';
import { onMounted } from 'vue';

const elm = () => {
    ElMessage({
        // message: `message is ${import.meta.env.MODE==='development'?'开发模式':'生产模式'}`,
        message: `message is ${import.meta.env.DEV ?'开发模式':'生产模式'}, MYTEST is ${import.meta.env.VITE_MYTEST}`,
        type: 'success',
    });
};
const eln = () => {
  ElNotification({
    title: 'Prompt',
    message: `spaceLayers is ${monitorIndex[0].spaceLayers[0].newCity}`,
    duration: 0,
  })
};

onMounted(() => {
    console.log(import.meta.env.MODE);
    console.log(import.meta.env.VITE_MYTEST);
    console.log(import.meta.env.DEV);
    console.log(import.meta.env.PROD);
    console.log(import.meta.env.SSR);
});
</script>

<template>
    <div>
        <h1>About Page</h1>
        <p>Welcome to the About Page!</p>

        <helloWorld />

        <el-button type="primary" @click="elm">ElMessage</el-button>
        <el-button type="primary" @click="eln">ElNotification</el-button>       
    </div>
</template>
<style scoped></style>
